home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Think Class Libraries / File class library / ISLE definitions / IconFamilies.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-30  |  5.2 KB  |  146 lines  |  [TEXT/KAHL]

  1. /*
  2.  
  3.   IconFamilies.h
  4.   Source:    Macintosh Technical Note #306 by Jim Mensch and David Collins
  5.  
  6.      Definitions to deal with icon families under System 7 and later
  7.  
  8.   October 6, 1992  isl
  9.   
  10. */
  11.  
  12. #pragma once
  13.  
  14. /*=====================*/
  15. /*===---------------===*/
  16.                                                                                         //    Resource types
  17. #define    Large1BitMask            (long)'ICN#'
  18. #define    Large4BitData            (long)'icl4'
  19. #define    Large8BitData            (long)'icl8'
  20. #define    Small1BitMask            (long)'ics#'
  21. #define    Small4BitData            (long)'ics4'
  22. #define    Small8BitData            (long)'ics8'
  23. #define    Mini1BitMask            (long)'sicn'
  24. #define    Mini4BitData            (long)'icm4'
  25. #define    Mini8BitData            (long)'icm8'
  26.  
  27. /*===---------------===*/
  28.                                                                                         //    IconTransformType values
  29. #define    ttNone                                    0x0000
  30. #define    ttDisabled                            0x0001
  31. #define    ttOffline                                0x0002
  32. #define    ttOpen                                    0x0003
  33. #define    ttSelected                            0x4000
  34. #define    ttSelectedDisabled            (ttSelected + ttDisabled)
  35. #define    ttSelectedOffline                (ttSelected + ttOffline)
  36. #define    ttSelectedOpen                    (ttSelected + ttOpen)
  37.  
  38.                                                                                         //    Transform label values
  39. #define    ttLabel0                                0x0000
  40. #define    ttLabel1                                0x0100
  41. #define    ttLabel2                                0x0200
  42. #define    ttLabel3                                0x0300
  43. #define    ttLabel4                                0x0400
  44. #define    ttLabel5                                0x0500
  45. #define    ttLabel6                                0x0600
  46. #define    ttLabel7                                0x0700
  47.  
  48. /*===---------------===*/
  49.                                                                                         //    Alignment values
  50. #define    atNone                                    0x0000
  51. #define    atVerticalCenter                0x0001
  52. #define    atTop                                        0x0002
  53. #define    atBottom                                0x0003
  54. #define    atHorizontalCenter            0x0004
  55. #define    atLeft                                    0x0008
  56. #define    atRight                                    0x000C
  57.  
  58. /*===---------------===*/
  59.                                                                                         //    IconSelectorValue masks
  60. #define    svLarge1Bit                            0x00000001
  61. #define    svLarge4Bit                            0x00000002
  62. #define    svLarge8Bit                            0x00000004
  63. #define    svSmall1Bit                            0x00000100
  64. #define    svSmall4Bit                            0x00000200
  65. #define    svSmall8Bit                            0x00000400
  66. #define    svMini1Bit                            0x00010000
  67. #define    svMini4Bit                            0x00020000
  68. #define    svMini8Bit                            0x00040000
  69. #define    svAllLargeData                    0x000000ff
  70. #define    svAllSmallData                    0x0000ff00
  71. #define    svAllMiniData                        0x00ff0000
  72. #define    svAll1BitData                        (svLarge1Bit + svSmall1Bit + svMini1Bit)
  73. #define    svAll4BitData                        (svLarge4Bit + svSmall4Bit + svMini4Bit)
  74. #define    svAll8BitData                        (svLarge8Bit + svSmall8Bit + svMini8Bit)
  75. #define    svAllAvailableData            0xffffffff
  76.     
  77. /*===---------------===*/
  78.                                                                                         //    Routines
  79.  
  80. pascal OSErr PlotIconID(const Rect *theRect, short align, short  transform, short theResID)
  81.      = {0x303C, 0x0500, 0xABC9};
  82.  
  83. pascal OSErr NewIconSuite(Handle *theIconSuite) = {0x303C, 0x0207, 0xABC9};
  84.  
  85. pascal OSErr AddIconToSuite(Handle theIconData,Handle theSuite,ResType theType)= {0x303C, 0x0608, 0xABC9};
  86.  
  87. pascal OSErr GetIconFromSuite(Handle *theIconData,Handle theSuite,ResType theType)= {0x303C, 0x0609, 0xABC9};
  88.  
  89. pascal OSErr ForEachIconDo(Handle theSuite,long selector,ProcPtr action,void *yourDataPtr)
  90.     = {0x303C, 0x080A, 0xABC9};
  91.  
  92. pascal OSErr GetIconSuite(Handle *theIconSuite,short theResID,long selector)= {0x303C, 0x0501, 0xABC9};    
  93.  
  94. pascal OSErr DisposeIconSuite(Handle theIconSuite,Boolean disposeData)= {0x303C, 0x0302, 0xABC9};
  95.  
  96. pascal OSErr PlotIconSuite(const Rect *theRect,short align,short transform,Handle theIconSuite)
  97.     = {0x303C, 0x0603, 0xABC9};
  98.  
  99. pascal OSErr MakeIconCache(Handle *theHandle,ProcPtr makeIcon,void *yourDataPtr)= {0x303C, 0x0604, 0xABC9};
  100.  
  101. pascal OSErr LoadIconCache(const Rect *theRect,short align,short transform,Handle theIconCache)
  102.     = {0x303C, 0x0606, 0xABC9};
  103.  
  104. pascal OSErr GetLabel(short labelNumber,RGBColor *labelColor,Str255 labelString)= {0x303c, 0x050B, 0xABC9};
  105.  
  106. pascal Boolean PtInIconID(Point testPt,Rect *iconRect,short alignment,short iconID)= {0x303c, 0x060D, 0xABC9};
  107.  
  108. pascal Boolean PtInIconSuite(Point testPt,Rect *iconRect,short alignment,Handle theIconSuite)
  109.     = {0x303c, 0x070E, 0xABC9};
  110.  
  111. pascal Boolean RectInIconID(Rect *testRect,Rect *iconRect,short alignment,short iconID)
  112.     = {0x303c, 0x0610, 0xABC9};
  113.  
  114. pascal Boolean RectInIconSuite(Rect *testRect,Rect *iconRect,short alignment,Handle theIconSuite)
  115.     = {0x303c, 0x0711, 0xABC9};
  116.  
  117. pascal OSErr IconIDToRgn(RgnHandle theRgn,Rect *iconRect,short alignment,short iconID)
  118.     = {0x303c, 0x0613, 0xABC9};
  119.  
  120. pascal OSErr IconSuiteToRgn(RgnHandle theRgn,Rect *iconRect,short alignment,Handle theIconSuite)
  121.     = {0x303c, 0x0714, 0xABC9};
  122.  
  123. pascal OSErr SetSuiteLabel(Handle theSuite, short theLabel)= {0x303C, 0x0316, 0xABC9};
  124.  
  125. pascal short GetSuiteLabel(Handle theSuite)= {0x303C, 0x0217, 0xABC9};    
  126.  
  127. pascal OSErr GetIconCacheData(Handle theCache, void **theData)= {0x303C, 0x0419, 0xABC9};    
  128.  
  129. pascal OSErr SetIconCacheData(Handle theCache, void *theData)= {0x303C, 0x041A, 0xABC9};    
  130.  
  131. pascal OSErr GetIconCacheProc(Handle theCache, ProcPtr *theProc)= {0x303C, 0x041B, 0xABC9};    
  132.  
  133. pascal OSErr SetIconCacheProc(Handle theCache, ProcPtr theProc)= {0x303C, 0x041C, 0xABC9};
  134.  
  135. pascal OSErr PlotSICNHandle(const Rect *theRect,short align,short transform,Handle theSICN)
  136.     = {0x303C, 0x061E, 0xABC9};
  137.  
  138. pascal OSErr PlotCIconHandle(const Rect *theRect,short align,short transform,CIconHandle theCIcon)
  139.     = {0x303C, 0x061F, 0xABC9};
  140.  
  141. pascal OSErr SetLabel(short labelNumber, const RGBColor *, ConstStr255Param)
  142.     = {0x303C, 0x050C, 0xABC9};
  143.     
  144.     
  145. /*===---------------===*/
  146. /*=====================*/